{include file="public/header2" /}
    <!--律师入口头部大图开始-->
    <div class="layui-fluid">
        <div class="layui-col-md12 layui-margin-bottom-100">
            <div class="layerenter-head">
                <div class="layerenter-head-login">
                    <div class="layerenter-head-tab">
                        <span class="layerenter-head-tab-l layer-active">律师登录</span>
                        <span class="layerenter-head-tab-r">律师注册</span>
                    </div>
                    <div id="login">
                        <form  class="layerenter-wraper" id="from2">
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-name">手机号：</label>
                                <input type="text" name="phone" id="layerenter-name" placeholder="请输入电话号码">
                            </div>
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-pass">密码：</label>
                                <input type="password" name="password" id="layerenter-pass" placeholder="请输入密码">
                            </div>
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-code">验证码：</label>
                                <input type="text" name="clods" id="layerenter-code" placeholder="请输入验证码">
                                <span class="layerenter-codekuang"><img src="{:captcha_src()}" alt="captcha" id="captch" width="100" height="45" onclick="this.src='{:captcha_src()}?rand='+Math.random()" /></span>
                               <a href="javascript:;" onclick="document.getElementById('captch').src='{:captcha_src()}?rand='+Math.random();">看不清楚，换一张</a>
                            </div>
                            <div class="layerenter-wraper-text">
                                <span class="right">忘记密码?</span>
                            </div>
                            <button type="submit" class="layerenter-login-btn">登录</button>
                        </form>
                    </div>

                    <div id="register" style="display: none;">
                        <form class="layerenter-wraper" id="from">
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-names">手机号码：</label>
                                <input type="text" name="phone" id="layerenter-names" placeholder="请输入您的电话号码">
                            </div>
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-tel">密码：</label>
                                <input type="tel" name="password" id="layerenter-tel" placeholder="请输入密码">
                            </div>
                            <div class="layerenter-wraper-item">
                                <label for="layerenter-code">手机验证码：</label>
                                <input type="text" name="clod" id="layerenter-code" placeholder="请输入验证码">
                                <span class="sent-code" id="yzm" onclick="sms()">发送验证码</span>
                            </div>
                            <div class="layerenter-wraper-text">
                                <input type="checkbox" id="check" name="cked">
                                <span>同意
                                    <span class="text-color-yellow">《会员注册协议》</span>和
                                    <span class="text-color-yellow">《隐私注册》</span>条款</span>
                            </div>
                            <button type="submit" class="layerenter-login-btn">注册</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--律师入口头部大图结束-->
<!--侧边四个按钮开始-->
<ul class="aside-right">
    <li>
        <i><img src="__STATIC__/computer/img/lls01/lls0115.png"></i>
        <div class="wait wait1">
            {:sysconf('youcedianhua')}
        </div>
    </li>
    <li>
        <i><img src="__STATIC__/computer/img/lls01/lls0116.png"></i>
        <div class="wait wait2">
            {:sysconf('weixinerweima')}
        </div>
    </li>
    <li>
        <a href="http://wpa.qq.com/msgrd?v=3&uin=958416459&site=qq&menu=yes">
            <i><img src="__STATIC__/computer/img/lls01/lls0117.png"></i>
        </a>
    </li>
    <!-- <li>
         <a href="">
             <i><img src="__STATIC__/computer/img/lls01/lls0118.png"></i>
         </a>
         <div class="wait wait4">
             呵呵
         </div>
     </li>-->
</ul>
<!--侧边四个按钮结束-->

    <!--选择注册零零诉的好处标题部分开始-->
{volist name="ret" id="vo"}
{if condition="$key eq 0"}
    <div class="layui-fluid layui-margin-bottom-100 layui-margin-top-100 wow bounceInLeft" data-wow-duration='1.2s'>
        <div class="layui-row">
            <div class="layui-col-md12  layui-text-center layui-one">
                <span class="layui-padding layui-boder-b text-color-black">{$vo.title}</span>
            </div>
        </div>
    </div>
    <!--选择注册零零诉的好处标题部分结束-->
    <!--选择注册零零诉的好处内容部分开始-->
{volist name="$vo.son" id="vo2"}
{if condition="$key eq 0"}
    <div class="layui-container layui-margin-bottom-100 wow bounceInLeft" data-wow-duration='1.2s'>
        <div class="layui-row">
            <div class="layui-col-md4">
                <img src="{$vo2.thumb}" width="100%">
            </div>
            <div class="layui-col-md8">
                <div class="layerenter-text">
                    <h1>{$vo2.title}</h1>
                  {$vo2.content}
                </div>
            </div>
        </div>
    </div>
{/if}
{/volist}

{volist name="$vo.son" id="vo2"}
{if condition="$key eq 1"}
    <div class="layerenter-bgone bg-color-gray">
        <div class="layui-container layui-margin-bottom-100 wow bounceInRight" data-wow-duration='1.2s'>
            <div class="layui-row">
                <div class="layui-col-md8">
                    <div class="layerenter-text">
                        <h1>{$vo2.title}</h1>
                        {$vo2.content}
                    </div>
                </div>
                <div class="layui-col-md4">
                    <img src="{$vo2.thumb}" width="100%">
                </div>
            </div>
        </div>
    </div>
{/if}
{/volist}

{volist name="$vo.son" id="vo2"}
{if condition="$key eq 2"}
    <div class="layerenter-bgone bg-color-white">
        <div class="layui-container layui-margin-bottom-100 wow bounceInRight" data-wow-duration='1.2s'>
            <div class="layui-row">
                <div class="layui-col-md4">
                    <img src="{$vo2.thumb}" width="100%">
                </div>
                <div class="layui-col-md8">
                    <div class="layerenter-text">
                        <h1>{$vo2.title}</h1>
                        {$vo2.content}
                    </div>
                </div>
            </div>
        </div>
    </div>
{/if}
{/volist}

{volist name="$vo.son" id="vo2"}
{if condition="$key eq 3"}
    <div class="layerenter-bgone bg-color-gray layui-margin-bottom-100">
        <div class="layui-container layui-margin-bottom-100 wow bounceInRight" data-wow-duration='1.2s'>
            <div class="layui-row">
                <div class="layui-col-md8">
                    <div class="layerenter-text">
                        <h1>{$vo2.title}</h1>
                        {$vo2.content}
                    </div>
                </div>
                <div class="layui-col-md4">
                    <img src="{$vo2.thumb}" width="100%">
                </div>
            </div>
        </div>
    </div>
{/if}
{/volist}


{/if}
{/volist}
    <!--选择注册零零诉的好处内容部分结束-->

    <!--合作流程标题部分开始-->
{volist name="ret" id="vo"}
{if condition="$key eq 1"}
    <div class="layui-fluid layui-margin-bottom-100 wow bounceInLeft" data-wow-duration='1.2s'>
        <div class="layui-row">
            <div class="layui-col-md12  layui-text-center layui-one">
                <span class="layui-padding layui-boder-b text-color-black">{$vo.title}</span>
            </div>
        </div>
        <div class="layui-row" style="margin-top: 60px;">
            <div class="layui-col-md12  layui-text-center layui-two">
                <span class="text-color-black">{$vo.generalize}</span>
            </div>
        </div>
    </div>
    <!--合作流程标题部分开始-->
    <!--合作流程内容部分开始-->
    <div class="layui-container layui-margin-bottom-100 wow bounceInRight" data-wow-duration='1.2s'>
        <div class="layui-row layui-text-center">
            {volist name="$vo.son" id="vo2"}
            <div class="layui-col-md3">
                <div class="litipic-item">
                    <img src="{$vo2.thumb}">
                </div>
            </div>
             {/volist}
        </div>
        <div class="layui-row layui-text-center liti-bg">
            {volist name="$vo.son" id="vo2"}
            <div class="layui-col-md3">{$vo2.title}</div>
            {/volist}
        </div>
        <div class="layui-row layui-text-center">
            <div class="layui-col-md12">
                <div class="second-btn">立即申请</div>
            </div>
        </div>
    </div>
{/if}
{/volist}
    <!--合作流程内容部分结束-->
<script src="__STATIC__/computer/js/layerenter.js"type="text/javascript" charset="utf-8"></script>
<script>
    //注册
    layui.use(['form'],function () {
        var form = layui.form;
        $("#from").submit(function (e) {
            e.preventDefault();
            var formzie = $(this).serialize();
            $.post("{:url('/index/layerenter/register')}",formzie,function (data) {
                if(data.code == 0){
                    layer.msg(data.msg)
                }else{
                    layer.msg(data.msg);
                    setTimeout(function () {
                        location.reload();
                    },2000);
                }
            });
        });

        //登录
        $("#from2").submit(function (e) {
            e.preventDefault();
            var formzie = $(this).serialize();
            $.post("{:url('/index/layerenter/logins')}",formzie,function (data) {
                if(data.code == 0){
                    layer.msg(data.msg);
                }else if(data.code == 3){
                    layer.msg(data.msg);
                    setTimeout(function () {
                        window.location.href="{:url('index/index')}";
                    },2000);
                }else{
                    layer.msg(data.msg);
                    setTimeout(function () {
                        location.reload();
                    },2000);
                }
            });
        });
        form.render();
    });

    //发送验证码
    var wait=60;
    function sms() {
        var  send = document.getElementById('yzm');
        var phone = $("#layerenter-names").val();
        var phoneurl = /^[1][3-9][0-9]{9}/;
        var res=phoneurl.test(phone);
        if(res == false){
            layer.msg('请输入正确的手机号码');
            return;
        }
        if(wait==0){
            send.removeAttribute('disabled');
            send.innerHTML='免费发送';
            wait=60;
        }else{
            if(wait == 60){
                $.getJSON("{:url('/index/sms/phonenull')}?phone="+phone,function(ret){
                    if(ret.code == 0){
                        layer.msg(ret.msg);
                    }
                });
            }
            send.setAttribute('disabled',true);
            send.innerHTML='（'+wait+'）秒后';
            wait--;
            setTimeout(function () {
                sms();
            },1000)
        }
    }

</script>
    {include file="public/footer" /}
